//
//  JgAdsInterstitialAdContainer.h
//  AnyThinkSDKDemo
//
//  Created by 刘娟 on 2022/11/17.
//  Copyright © 2022 抽筋的灯. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <JgAdsSDK/JgAdsInterstitialAd.h>
@class JgAdsInterstitialAdContainer;
NS_ASSUME_NONNULL_BEGIN

@protocol JgAdsInterstitialAdContainerDelegate <NSObject>
/**
 *  插屏广告素材加载成功
 */
- (void)jgadsContainer_jgadsInterstitialAdDidLoad:(JgAdsInterstitialAdContainer *)InterstitialAd withPrice:(NSInteger)bidPrice;

/**
 *  插屏广告请求失败
 */
- (void)jgadsContainer_jgadsInterstitialAdFailLoadError:(NSError *)error;

@end

@interface JgAdsInterstitialAdContainer : NSObject

@property (nonatomic, weak)id<JgAdsInterstitialAdContainerDelegate> containerDelegate;

@property (nonatomic, weak)id<JgAdsInterstitialAdDelegate> delegate;

/// 初始化容器
- (instancetype)initPosId:(NSString *)posId delegate:(id<JgAdsInterstitialAdDelegate>)delegate;

/// 加载
- (void)loadInterstitialAd;

/// 展示
- (void)showInterstitialAdWithRootViewController:(UIViewController *)controller;

/// 销毁
- (void)close;

///上报竞赢通知
- (void)sendWinNotificationWithPrice:(NSInteger)price;

///上报竞败通知
- (void)sendWinFailNotificationReason:(JgAdsBiddingLossReason)lossReason winnerPirce:(NSInteger)winnerPirce;

///获取竞价价格
- (NSInteger)getBidPrice;
@end

NS_ASSUME_NONNULL_END
